

import UIKit
import SwiftyStoreKit

class FAMStoreKitTool: NSObject {
    @objc func FAM_completeTransactions(){
        SwiftyStoreKit.completeTransactions(atomically: true) { purchases in
            for purchase in purchases{
                switch purchase.transaction.transactionState{
                case .purchased,.restored:
                    if purchase.needsFinishTransaction{
                        SwiftyStoreKit.finishTransaction(purchase.transaction)
                    }
                case .failed,.purchasing,.deferred:
                    break
                @unknown default:
                    break;
                }
            }
        }
    }
}
